package 行为型模型.责任链模式;

public class ALLManager extends Leader {
    public ALLManager(String name) {
        super(name);
    }

    @Override
    public void handleRequset(LeaveRequset leaveRequset) {
        if (leaveRequset.getDaynum() > 10) {
            if (this.nextLeader != null) {
                this.nextLeader.handleRequset(leaveRequset);
            }else{
                System.out.println("辞职滚蛋!");
            }
        }else {
            System.out.println("总经理:"+name);
            System.out.println(leaveRequset.getName()+":请假"+leaveRequset.getDaynum()+"允许");
        }
    }


}
